<template>
  <el-table :data="homeInfo.orderTypeInfos" style="width: 100%;padding-top: 15px;">
    <el-table-column label="服务类型" min-width="200">
      <template slot-scope="scope">
        {{scope.row.name}}
      </template>
    </el-table-column>
    <el-table-column label="次数" width="195" align="center">
      <template slot-scope="scope">
        {{scope.row.count}}
      </template>
    </el-table-column>
    <el-table-column label="均单价" width="100" align="center">
      <template slot-scope="scope">
        {{scope.row.avgPrice}}
      </template>
    </el-table-column>
  </el-table>
</template>

<script>

import { home } from "@/api/home/index";
export default {
  data() {
    return {
     homeInfo: {
        unHandleOrderCount: 0,
        unRebackOrderCount: 0,
        orderCount: 0,
        customerCount: 0,
        benefit: 0,
        orderTypeInfos: [
          { count: 1, name: "修门窗", avgPrice: 0 },
          { count: 0, name: "换门窗", avgPrice: 0 }
        ]
      }
    }
  },
  filters: {
    
  },
  created() {
    this.fetchData()
  },
  methods: {
    fetchData() {
      home().then(resp => {
        this.homeInfo = resp.data
      });
    }
  }
}
</script>
